package com.lx.controller;


import com.lx.service.ApiService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author lixing
 * @date 2021/5/24 11:22
 */
@Slf4j
@Controller
@RequestMapping("/ConsumerController")
public class ConsumerController {
    @Reference // apache dubbo的@Reference注解，注入服务接口实例
    private ApiService apiService;

    @RequestMapping("/")
    @ResponseBody
    public String sayHello(String name) {
        return apiService.sayHello(name);
    }

}
